package com.voice.call.service.impl;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.voice.call.entity.LuckyCreditStar;
import com.voice.call.mapper.LuckyCreditStarMapper;
import com.voice.call.service.LuckyCreditStarService;

@Service
public class LuckyCreditStarServiceImpl implements LuckyCreditStarService{
	
	@Resource
	private LuckyCreditStarMapper luckyCreditStarMapper;

	//根据广告分钟数，获取心
	@Override
	public	LuckyCreditStar getLuckyCreditStarForAdTime(Integer adTime){
		
		if (adTime == null) {
			return null;
		}
		return luckyCreditStarMapper.getLuckyCreditStarNum(adTime);
			
	}
	
	@Override
	public LuckyCreditStar getLuckyCreditStarForStarNum(Integer starNum){
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("starNum", starNum);
		return luckyCreditStarMapper.getOne(params);
	}
}
